#include <REGX52.H>
#include "Timer.h"
#include "Digital_tube.h"
#include "Delay.h"
unsigned int T0Count=0;
unsigned char i;

sbit ADDR0 = P1 ^ 0;
sbit ADDR1 = P1 ^ 1;
sbit ADDR2 = P1 ^ 2;
sbit ADDR3 = P1 ^ 3;
sbit ENLED = P1 ^ 4;

/// @brief LED初始化函数
void LED_Init()
{
	ADDR0 = 0;
	ADDR1 = 1;
	ADDR2 = 1;
	ADDR3 = 1;
	ENLED = 0;
}
void main(){
	Timer0_Init();
	LED_Init();
	while(1){
	}
}

void Timer0_Rountine(void)	interrupt 1
{
	TL0 = 0x66;
	TH0 = 0xFC;
	T0Count++;
	if(T0Count>=1000){
		T0Count = 0;
		i++;
		P0=~i;
	}
}